package com.api.services;

import java.util.List;
import java.util.Map;

import javax.validation.constraints.NotNull;
import javax.ws.rs.FormParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path("")
public interface IZyncroApi {

	@POST
	@Path("/userservice-trunk/domain/add")
	@Produces(MediaType.APPLICATION_JSON)
	Map<String, String> createDomainNew(@FormParam("domainName") String domainName, @FormParam("domainQuota") long domainQuota,
			@FormParam("totalUsers") int totalUsers, @FormParam("domainType") int domainType, @FormParam("userName") String userName,
			@FormParam("lastName") String lastName, @FormParam("password") String password, @FormParam("email") String email,
			@FormParam("userQuota") long userQuota, @FormParam("language") int language);

	@POST
	@Path("/userservice/domain/add")
	@Produces(MediaType.APPLICATION_JSON)
	Map<String, String> createDomainOld(@FormParam("domainType") int domainType, @FormParam("domainName") String domainName,
			@FormParam("quota") long domainQuota, @FormParam("totalUsers") int totalUsers);

	@POST
	@Path("/tokenservice-trunk/oauth/v1/consumer_registration")
	String generateConsumer(@NotNull @FormParam("name") String name, @NotNull @FormParam("service") String service,
			@NotNull @FormParam("source") String source, @NotNull @FormParam("category") String category);

	@POST
	@Path("/tokenservice/oauth/v1/consumer_registration")
	String registerConsumer(@NotNull @FormParam("name") String name, @FormParam("cons_key") String apiKey,
			@FormParam("secret") String apiSecret, @FormParam("signature_method") String signatureMethod);

	@POST
	@Path("/userservice/domain/editProperties")
	@Produces(MediaType.APPLICATION_JSON)
	Map<String, String> editOrganization(@FormParam("sessionUrn") String sessionUrn, @NotNull @FormParam("urnDomain") String urnDomain,
			@FormParam("listProperties") List<String> listProperties);

	@POST
	@Path("/userservice/webclient/login")
	@Produces(MediaType.APPLICATION_JSON)
	Map<String, String> login(@FormParam("username") String username, @FormParam("password") String password);

	@POST
	@Path("/userservice/user/add")
	@Produces(MediaType.APPLICATION_JSON)
	Map<String, String> addMainAdmin(@FormParam("urnDomain") String urnDomain, @FormParam("userName") String userName,
			@FormParam("lastName") String lastName, @FormParam("password") String password, @FormParam("email") String email,
			@FormParam("quota") String quota, @FormParam("rights") String rights, @FormParam("language") String language,
			@FormParam("addedByAdmin") String addedByAdmin, @FormParam("groupcreator") String groupcreator,
			@FormParam("enterprisecreator") String enterprisecreator, @FormParam("administrator") String administrator);

	@Path("/userservice/user/setstatus")
	@POST
	@Produces({ MediaType.APPLICATION_JSON })
	Map<String, String> setUserStatus(@NotNull @FormParam("sessionUrn") String sessionUrn, @FormParam("status") int status,
			@FormParam("message") String message);
}
